<template>
	<view>
		<button type="default" @click="logout">退出帐号</button>
		<template v-if="isEdit">
			<u-button type="success" @click="change">a</u-button>
		</template>
		<template v-else>
			<u-button type="error">b</u-button>
			<u-button type="info">取消</u-button>
		</template>
	</view>
</template>

<script>
	import {logout} from '@/api/apiList/user.js'
	export default{
		data(){
			return{
				isEdit:true
			}
		},
		methods:{
			async API_logout(){
				let result = {
					
				}
				return await logout(result)
			},
			async logout(){
				let res = await this.API_logout()
				console.log(res)
			},
			change(){
				this.isEdit = false
			}
		}
	}
</script>

<style>
</style>
